import { h, render } from 'vue'
import XtxMessage from '@/components/library/xtx-message'
const node = h('div')
render(node, document.body)
let time = null
export default ({ type, title }) => {
  const createNode = h(XtxMessage, { type, title })
  render(createNode, node.el)
  clearTimeout(time)
  time = setTimeout(() => {
    //   清空容器
    render(null, node.el)
  }, 2000)
}
